const Radio = require('./radio');

const r = new Radio('music radio', 'FM 106.7');

r.on('open', function(name, freq) {
  console.log(`"${name}" ${freq} opened`);
});

r.on('playing', function(msg) {
  console.log('lalalala');
});

r.on('close', function(name, freq) {
  console.log(`"${name}" ${freq} closed`);
});

r.play();

setTimeout(function() {
  r.stop();
}, 3000);
